<!-- 注册成功 -->
<template>
  <div class="page-registr-finish-main">
    <div class="registr-finish">
      <div class="registr-finish-box">
        <Icon :type="tipsIcon" size="60" />
        <h4>{{ tipsName }}</h4>
        <p>{{ tipsContent }}</p>
      </div>
    </div>
    <Row type="flex" justify="center">
      <Col span="16">
        <div class="next-btn">
          <Button type="primary" @click="handleAgree">{{ tipsBtnText }}</Button>
        </div>
      </Col>
    </Row>
  </div>
</template>

<script>
export default {
  props: {
    tipsIcon:{
      type: String,
      default: "ios-checkmark-circle-outline",
    },
    tipsName: {
      type: String,
      default: "注册成功",
    },
    tipsContent: {
      type: String,
      default: "恭喜，您已成功完成注册",
    },
    tipsBtnText: {
      type: String,
      default: "去登录",
    },
    tipsBtnType: {
      type: String,
      default: "1",
    },
    tipsBtnRoute: {
      type: String,
      default: "/login",
    },
  },
  data() {
    return {};
  },
  methods: {
    // 去登录
    handleAgree() {
      if (this.$props.tipsBtnType == 1) {
        this.$router.push({
          path: this.$props.tipsBtnRoute,
        });
      }else{
        this.$emit("submitBtn")
      }
    },
  },
  created() {},
  mounted() {},
};
</script>

<style lang="less" scoped>
.registr-finish {
  padding: 30px 0 50px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  h4 {
    font-size: 24px;
    font-weight: normal;
    margin: 20px 0 5px 0;
  }
  p {
    font-size: 14px;
    color: #999;
  }
}
.next-btn {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.ivu-btn {
  width: 100%;
}
</style>
